<?php
//set style
$aJS = array(assets('js/jquery-ui-1.10.4.custom.min.js', true), assets('js/jquery.form.min.js', true), "https://www.google.com/recaptcha/api.js?hl=vi");
$this->frontend_lib->setAJs($aJS);
$this->frontend_lib->setACss(assets('css/jquery-ui-1.10.4.custom.min.css', true));
$info = getOption(array('address', 'phone', 'contact_mail', 'fb_fan_page', 'google_plus', 'google_map_key', 'google_recaptcha_public_key'));
$aMap = array('key'=> $info->google_map_key->opt_val,'q'=>$info->address->opt_val);
?>
<div id="footer">
	<div id="contact-page" class="container">
		<div class="bg">
			<div class="row">
				<div class="col-sm-8">
					<div class="contact-form mgt10">
						<h2 class="title text-center">Thông tin của bạn</h2>
						<div id="flg_message" class="alert fade in hidden">
							<button type="button" class="close">×</button>
							<h4 class="message-title"></h4>
							<div class="message-text"></div>
						</div>
						<form role="form" method="post" action="<?php echo page_url('lien-he-quang-cao/gui'); ?>">
							<div class="form-group col-md-12 col-xs-12">
								<label for="name"><span class="text-danger"><i class="glyphicon glyphicon-asterisk"></i></span> Tên</label>
								<input type="text" class="form-control" name="contact_ad[name]" id="name" maxlength="100" />
							</div>
							<div class="form-group col-md-12 col-xs-12">
								<label for="email"><span class="text-danger"><i class="glyphicon glyphicon-asterisk"></i></span> Địa chỉ Email</label>
								<input type="text" class="form-control" name="contact_ad[email]" id="email" maxlength="250" />
							</div>
							<div class="form-group col-md-12 col-xs-12">
								<label for="position">Vị trí đặt quảng cáo</label>
								<?php $aPos = unserialize(ADVERTISE_POST_ARRAY); ?>
								<select id="position" name="contact_ad[position]" class="form-control">
									<?php foreach ($aPos as $key => $value) { ?>
									<option value="<?php echo $key; ?>"><?php echo $value; ?></option>
									<?php } ?>
								</select>
							</div>
							<div class="form-group col-md-12 col-xs-12">
								<label for="anchor"><span class="text-danger"><i class="glyphicon glyphicon-asterisk"></i></span> Liên kết</label>
								<input type="text" class="form-control" name="contact_ad[anchor]" id="anchor" maxlength="160" />
							</div>
							<div class="form-group col-md-6 col-xs-6">
								<label for="start-date"><span class="text-danger"><i class="glyphicon glyphicon-asterisk"></i></span> Ngày bắt đầu</label>
								<input type="text" class="form-control input-date" name="contact_ad[start_date]" id="start-date" maxlength="160" />
							</div>
							<div class="form-group col-md-6 col-xs-6">
								<label for="end-date"><span class="text-danger"><i class="glyphicon glyphicon-asterisk"></i></span> Ngày kết thúc</label>
								<input type="text" class="form-control input-date" name="contact_ad[end_date]" id="end-date" maxlength="160" />
							</div>
							<div class="form-group col-md-12 col-xs-12">
								<label for="input-advertise-content"><span class="text-danger"><i class="glyphicon glyphicon-asterisk"></i></span> Nội dung quảng cáo</label>
								<input type="file" class="form-control" id="input-advertise-content" name="userfile" />
							</div>
							<div class="form-group col-md-12 col-xs-12">
								<label for="note">Nội dung yêu cầu</label>
								<textarea name="contact_ad[note]" id="note" class="form-control" rows="5" maxlength='10000'></textarea>
							</div>
							<div class="form-group col-md-12" id="captchadiv" data-key="<?php echo getOption('google_recaptcha_public_key') ;?>">
                                <div id="recaptcha" class="g-recaptcha pull-left" data-callback="enable_contact_submit_button" data-btnsubmit=".btn-send-contact" data-sitekey="<?php echo $info->google_recaptcha_public_key->opt_val ?>"></div>
                                <button type="button" disabled="disabled" class="pull-right btn btn-primary btn-send-contact"><i class="glyphicon glyphicon-envelope"></i> Gửi</button>
				            </div>
							<div class="clearfix"></div>
						</form>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="contact-info mgt10">
						<h2 class="title">PHIÊN CHỢ VIỆT</h2>
						<address>
							<p><?php echo $info->address->opt_val; ?></p>
							<p>Mobile: <?php echo $info->phone->opt_val; ?></p>
							<p>Email: <?php echo $info->contact_mail->opt_val; ?></p>
						</address>
						<div class="social-networks">
							<ul>
								<li>
									<a href="<?php echo $info->fb_fan_page->opt_val; ?>"><i class="fa fa-facebook"></i></a>
								</li>
								<li>
									<a href="#"><i class="fa fa-twitter"></i></a>
								</li>
								<li>
									<a href="<?php echo $info->google_plus->opt_val; ?>"><i class="fa fa-google-plus"></i></a>
								</li>
								<li>
									<a href="#"><i class="fa fa-youtube"></i></a>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
    </div><!--/#contact-page-->